// Copyright (c) 2021 Terminus, Inc.
//
// This program is free software: you can use, redistribute, and/or modify
// it under the terms of the GNU Affero General Public License, version 3
// or later ("AGPL"), as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

package dop

import (
	"net/http"

	"github.com/erda-project/erda/apistructs"
	"github.com/erda-project/erda/modules/openapi/api/apis"
)

var CreateAPIAssetVersion = apis.ApiSpec{
	Path:        "/api/api-assets/<assetID>/versions",
	BackendPath: "/api/api-assets/<assetID>/versions",
	Host:        APIMAddr,
	Scheme:      "http",
	Method:      http.MethodPost,
	CheckLogin:  true,
	CheckToken:  true,
	RequestType: &apistructs.APIAssetVersionCreateRequest{
		OrgID:            0,
		APIAssetID:       "",
		Major:            0,
		Minor:            0,
		Patch:            0,
		Desc:             "",
		SpecProtocol:     "",
		SpecDiceFileUUID: "",
		Spec:             "",
		Inode:            "",
		Instances:        nil,
		IdentityInfo:     apistructs.IdentityInfo{},
		Source:           "",
		AppID:            0,
		Branch:           "",
		ServiceName:      "",
	},
	ResponseType: apistructs.CreateAPIAssetVersionBody{},
	Doc:          "新增 API 资料版本",
}
